The invention relates generally to computer systems and deals more particularly with control of access to shared data.
Executing multiple application programs in multiprocessor systems usually requires control information that specifies whether and on what conditions one of several processors may access shared data (for example, a record) and read and/or change it by write operations.
Once a particular processor has been authorized to read or write such a shared record, a lock instruction keeps the other processors from accessing the shared record at the same time. After the authorized processor has completed its operation on the shared record, an unlock instruction releases the record for further access requests.
According to the state of the art, a separately addressable table or database (referred to as a global lock table in English or as a lock file in the IBM VSE operating system) is provided for access administration and control.
The lock file for administration and control purposes has different control fields for the shared data or record to be accessed (FIG. 1). For access administration and control of the records, each control field contains information and is preceded by a search key (for example, A1, A2, A3) which is directly (identically) or indirectly associated with the search key (DA1, DA2, DA3) of the respective shared data (records 1, 2, 3).
When a particular shared record, for example, record 1, in the application program of a processor (for example, processor 2, FIG. 1) is addressed for reading or writing (by specifying the search key, for example, A1), the control field for this record is initially addressed by means of the lock instruction, using that search key. This causes the lock file to be blocked for competing access requests (in IBM operating system VSE, for example, by the instruction RESERVE DISK). Then the information of the addressed control field is read into the main memory of the requesting processor (read operation R) and it is determined whether the processor's access request may be granted.
If it is, the information of the control field is updated according to the request (or release) (update operation) and written back into the associated control field of the lock file (write operation W). The lock file is then released for further access operations (in IBM operating system VSE, for example, by the instruction RELEASE DISK).
If the request of the processor resulting in the lock instruction cannot be granted, the lock file is released for further access operations and control is returned back to the application program with a corresponding message or (after some time has passed) a renewed request is issued to the lock file by means of the search key.
In these steps, the execution of the read operation R requires a substantial amount of time t, roughly 40 to almost 50 per cent of the total time T, of the periods represented in FIG. 2.
Accordingly, a general object of the present invention is to reduce the administration and control time required to access a data object.